package com.itheima.create;

public class MethodDemo2 {
    public static void main(String[] args) {
        // 方法必须调用才可以执行
        int sum = add(10, 20);
        System.out.println("求和结果是：" + sum);

        System.out.println("---------------------");

        int sum1 = add(100, 200);
        System.out.println("求和结果是：" + sum1);
    }

    public static int add(int a, int b){
        int c = a + b;
        return c;
    }
}
